﻿@model OJS.Web.ViewModels.Shared.PaginationViewModel

<ul class="pagination">
    @if (Model.CurrentPage == 1)
    {
        <li class="disabled"><a href="#">&laquo;</a></li>
    }
    else
    {
        <li><a href="@(Model.Url + (Model.CurrentPage - 1))">&laquo;</a></li>
    }
    @for (int i = 1; i <= Model.AllPages; i++)
    {
        <li><a href="@(Model.Url + i)">@i</a></li>
    }
    @if (Model.CurrentPage == Model.AllPages)
    {
        <li class="disabled"><a href="#">&raquo;</a></li>
    }
    else
    {
        <li><a href="@(Model.Url + (Model.CurrentPage + 1))">&raquo;</a></li>
    }
</ul>